package cn.edu.zafu.bigdata.x.zbw;

public class Coursezbw {
    private String courseID; // 课程编号
    private String courseName; // 课程名称
    private int credits; // 学分
    private String instructor; // 授课教师

    // 构造方法
    public Coursezbw(String courseID, String courseName, int credits, String instructor) {
        this.courseID = courseID;
        this.courseName = courseName;
        this.credits = credits;
        this.instructor = instructor;
    }


    // print方法，用于输出课程信息
    public void print() {
        System.out.println("课程编号: " + courseID);
        System.out.println("课程名称: " + courseName);
        System.out.println("学分: " + credits);
        System.out.println("授课教师: " + instructor);
    }

    // Getter和Setter方法
    public String getCourseID() {
        return courseID;
    }

    public void setCourseID(String courseID) {
        this.courseID = courseID;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public int getCredits() {
        return credits;
    }

    public void setCredits(int credits) {
        this.credits = credits;
    }

    public String getInstructor() {
        return instructor;
    }

    public void setInstructor(String instructor) {
        this.instructor = instructor;
    }

    // 主方法，用于测试Course类
    public static void main(String[] args) {
        // 创建Course对象
        Coursezbw course = new Coursezbw("CS101", "Introduction to Computer Science", 4, "Dr. Smith");

        // 打印课程信息
        course.print();
    }
}